<html> 
<head> 
	<title>gloomy term</title> 
 
<script type="text/javascript" src="ssh.js"> </script>
<script type="text/javascript" src="main.js"> </script>
<script type="text/javascript" src="terminal.js"> </script>
<script type="text/javascript" src="parser.js"> </script>

<style type="text/css">
tr {
        font-family: courier,fixed,monospace;
        font-size: 12px;
}
</style>
<script type="text/javascript">
function start() {
  var body = document.getElementById('body_');
  body.onkeypress=function() { keyPressHandler(window.event.charCode);};
  body.onkeydown=function() { keyDownHandler(window.event.keyCode); };

  document.getElementById('startButton').style.visibility = 'hidden';

  var proxyHost = document.getElementById('proxyhost').value;
  var proxyURI = "ws://" + proxyHost + ":10101/echo";
  var host = document.getElementById('hostname').value;
  var user = document.getElementById('username').value;
  var pwd = document.getElementById('pwd').value;
  initTerminal();
  loadData(proxyURI, host, user, pwd);
}
</script>
</head>

<body id='body_'>
  <div id="nacl_ssh_plugin_content"></div>
  <script type="text/javascript">
    var contentDiv = document.getElementById('nacl_ssh_plugin_content');
    loadNaClSSHClient(contentDiv,
                      'ssh_plugin',
                      'x86-32: ssh_plugin_x86_32.nexe?rnd=' + Math.random() + '\nx86-64: ssh_plugin_x86_64.nexe?rnd=' + Math.random());
  </script>

<input type="hidden" value="127.0.0.1" id="proxyhost" />
Host:port: <input id=hostname type=text value=""> &nbsp;&nbsp;&nbsp; User: <input id=username type=text value="">  &nbsp;&nbsp;&nbsp;    Password: <input id=pwd type=password> &nbsp;&nbsp;&nbsp; <button id=startButton onclick='start()'>Start SSH session</button>


<div id=terminal>
  <table id=termTable border='0' cellSpacing='0' cellPadding='0'> 
  </table>
</div>
<input id=inputbox type=text style="visibility:hidden" onfocus="setFocusToTerm();"/>
<pre id=log></pre>
</body> 
</html>
